import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/less/common.css'
import BootstrapVue from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import '@/assets/iconfont/iconfont.css'
import './plugins/element.js'
import '@/assets/iconfont/iconfont.js'
import infiniteScroll from 'vue-infinite-scroll'
Vue.use(infiniteScroll)
import CKEditor from '@ckeditor/ckeditor5-vue'

import UrlPath from './urlPath.js'
// 导入请求方法
import {
  post_form,
  post_json,
  get,
  put_json,
  put_form,
  deletes_json,
  deletes,
  // baseurl
} from './http.js'

// 配置请求根路径
// axios.defaults.baseURL = "http://172.18.84.23:8888/"; // 关键步骤–填写后台请求统一的地址
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
Vue.prototype.$urlPath = UrlPath;

// 定义全局变量
Vue.prototype.$post_form = post_form;
Vue.prototype.$post_json = post_json;
Vue.prototype.$get = get;
Vue.prototype.$put_json = put_json;
Vue.prototype.$put_form = put_form;
Vue.prototype.$deletes = deletes;
// Vue.prototype.$baseurl = baseurl;
Vue.prototype.$deletes_json = deletes_json;
Vue.prototype.$http = axios;
Vue.config.productionTip = false;

Vue.use(CKEditor);
Vue.use(BootstrapVue)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
